
/**
 * Copyright (c) 2007, Ashish Lijhara
 * All rights reserved.
 *
 *
 *MainTest.java
 *
 */

package crazy.java.Aetas;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.HeadlessException;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Ashish (Java Crazy)
 */
public class AetasMain extends JFrame {
    
    public static JLabel jLabel1;
    public static JPanel panel;
    public AetasMain() throws HeadlessException {
        
        super("Aetas");
        buildContentPane();
        setSize(640, 479);
        setResizable(false);
        GlassPainter glass=new GlassPainter(this);
        setGlassPane(glass);
        glass.setVisible(true);
        setLocationRelativeTo(null);
        setUndecorated(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        MoveMouseListener mml = new MoveMouseListener(glass);
        glass.addMouseListener(mml);
        glass.addMouseMotionListener(mml);
    }
    
    public void buildContentPane() {
        JPanel bg=new BGPanel(new BorderLayout());
        
        setContentPane(bg);
        
        
        TransparentJPanel labelContainer=new TransparentJPanel();
        jLabel1=new TextUtil();
        jLabel1.setPreferredSize(new Dimension(240, 80));
        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(labelContainer);
        labelContainer.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(290, Short.MAX_VALUE)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(150, 150, 150))
                );
        jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
                );
        add(labelContainer,BorderLayout.NORTH);
        panel=new clockContainer();
        add(panel,BorderLayout.CENTER);
        
    }
    
    
    public static void main(String[] args) {
        // SwingUtilities.invokeLater(new Runnable() {
        //public void run() {
        
        AetasMain tester = new AetasMain();
        tester.setVisible(true);
        // }
        //});
    }
}
